-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
open-mpi: Use new Apple linker for mpicc/mpicxx #171426
Conversation
I'm wondering if we shouldn't keep the linker consistent, in particular when linking both C and Fortran (but with a main in C). |
This seems to work, at least for a simple test (is there an open-source C/Fortran project I should test?). fortsub.f90
main.c
Build and link:
Output:
The linker warning also occurs with the previous version of the forumula. |
503b2af
to
43adb7c
Compare
Sorry to invalidate the review. I forgot to bump the formula revision (which I think is necessary?). |
Thanks for contributing to Homebrew! 🎉 It looks like you're having trouble with a CI failure. See our contribution guide for help. You may be most interested in the section on dealing with CI failures. You can find the CI logs in the Checks tab of your pull request. |
Newbie here, so I don't really understand the procedures. I can locally reproduce the errors with opencoarrays and vineyard, and they are fixed when I brew install --build-from-source. Does this mean I should bump the revisions of these forumulae in my PR to get new bottles built? The error with root test is the same (at least locally) whether I use the modified open-mpi formula from this PR or the existing one. My only guess is that the failure could be related to an Xcode update. Any ideas? |
Yes for
|
43adb7c
to
6fda11d
Compare
I'm afraid I don't understand the brew linkage errors. Are these indicating real issues caused by the changes to the open-mpi formula here? |
Looks like you need to rebase on |
3dbe02d
to
8b24ad7
Compare
4c6a706
to
171a490
Compare
171a490
to
59520e1
Compare
b7adf39
to
7250ffa
Compare
A flag to force the ld_classic linker was added in Homebrew#144554 to avoid issues with Xcode 15. However, some time between then and now (Xcode 15.3 and macOS Sonoma 14.4.1) the new linker seems to work for C/C++, although the Fortran test still fails when ld_new is used. In this PR, I have limited the ld_classic flag to only apply to mpifort wrapper compiler. My motivation for switching to the new linker for C++ is that it solves linker failures when I try to compile my C++ project with mpicxx -flto=auto and g++-14 as the host compiler.
🤖 An automated task has requested bottles to be published to this PR. |
A flag to force the ld_classic linker was added in #144554 to avoid issues with Xcode 15. However, some time between then and now (Xcode 15.3 and macOS Sonoma 14.4.1) the new linker seems to work for C/C++, although the Fortran test still fails when ld_new is used. In this PR, I have limited the ld_classic flag to only apply to mpifort wrapper compiler. My motivation for switching to the new linker for C++ is that it solves linker failures when I try to compile my C++ project with mpicxx -flto=auto and g++-14 as the host compiler.
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?